<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.3.1.css" />
<link rel="stylesheet" type="text/css" href="css/login.css" />
	<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
	<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<title>Insert title here</title>
<script src="nu.js"></script>
</head>
<body>
	<section id="boardListPage" data-role="page" data-add-back-btn="true"> 
	<header data-role="header" data-position="fixed">
	<a href="menu.nu" data-role="button" class="ui-btn-right" data-icon="home">Home</a>
	<center><img src="./././img/board.png" height="50"></center>
	</header>
	<div class="content" data-role="content">
	<ul data-role="listview" data-inset="true">
		<c:forEach var="plan" items="${requestScope.listvo.planVOlist}">
				<li><a href="showPlanDetail.nu?nu_plan_no=${plan.nu_plan_no}"><div>
				<table>
					<tr>
						<td width="25%"><img src="./././img/notice.png" height="50"></td>
						<td><p><font size="5.5" color="#5D5D5D">${plan.nu_plan_title}</font></p>
				 			<p><font size="1" color="#8C8C8C">시작일 : ${plan.nu_plan_start_date} 종료일 : ${plan.nu_plan_end_date }</font></p>
				 		</td>
					</tr>
				</table>
				</div></a></li>
			</c:forEach>
	</ul>

		<ul data-role="listview" data-inset="true">
			<c:forEach var="listvo" items="${requestScope.listvo.list}">
				<li><a href="showContentHits.nu?no=${listvo.no }"><div>
    <p><font size="2" color="#8C8C8C">${listvo.no }&nbsp;&nbsp;&nbsp;</font><font size="4" color="#5D5D5D">${listvo.title }</font></p>
    <p><font size="1" color="#8C8C8C">작성자 : </font>
    <c:choose>
     <c:when test="${listvo.nick_name=='공부의 신'||listvo.nick_name=='만수무강'||listvo.nick_name=='금연종결자'||listvo.nick_name=='돈으로 똥 닦는'||listvo.nick_name=='인간문화재'}">
      <font color="#FF1F27" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='엘리트'||listvo.nick_name=='병원 킬러'||listvo.nick_name=='담배를 물리친'||listvo.nick_name=='부르주아'||listvo.nick_name=='손발이 닳아 없어진 이병'}">
      <font color="#30D9E6" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='전교 1등'||listvo.nick_name=='몸짱'||listvo.nick_name=='존경스러운 금연자'||listvo.nick_name=='졸부'||listvo.nick_name=='혼자서도 잘해요'}">
      <font color="#A3FF00" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='3등급'||listvo.nick_name=='건강한'||listvo.nick_name=='자랑스러운 금연자'||listvo.nick_name=='근검절약하는'||listvo.nick_name=='부지런한'}">
      <font color="#FCEE5C" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='초심자'}">
      <font color="#E6E6E6" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='노력해야할'||listvo.nick_name=='느림보'||listvo.nick_name=='더 줄여야할'||listvo.nick_name=='하층민'||listvo.nick_name=='작심삼일'}">
      <font color="#99B573" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='좀 모자란'||listvo.nick_name=='돼지'||listvo.nick_name=='헤비스모커'||listvo.nick_name=='평생 로또나 살'||listvo.nick_name=='방해만 되는'}">
      <font color="#C69C6D" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='기술 배워라'||listvo.nick_name=='몬스터'||listvo.nick_name=='예비 폐암환자'||listvo.nick_name=='신용불량자'||listvo.nick_name=='이 어플 왜 쓸까'}">
      <font color="#758C9D" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='아메바'||listvo.nick_name=='평생 그렇게 살'||listvo.nick_name=='오늘내일할'||listvo.nick_name=='수드라'||listvo.nick_name=='패가망신할'}"> 
      <font color="#42452B" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='루저'||listvo.nick_name=='산소소모기'||listvo.nick_name=='故'||listvo.nick_name=='그지'||listvo.nick_name=='똥 제조기'}">
      <font color="#333333" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="2">${listvo.nick_name }</font>
     </c:when>
     <c:when test="${listvo.nick_name=='공부관리자'||listvo.nick_name=='운동관리자'||listvo.nick_name=='금연관리자'||listvo.nick_name=='재테크관리자'||listvo.nick_name=='생활관리자'}">
      <font color="#A566FF" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${listvo.nick_name }</font>
     </c:when>
     </c:choose>
    ${listvo.id }</p><p><font size="1" color="#8C8C8C">작성일자 : ${listvo.time_posted }   hits : ${listvo.hits }</font></p>
    </div></a></li>
			</c:forEach>
		</ul>
		
		<c:forEach items="${sessionScope.login.list }" var="gvo">
        	<c:choose>
        		<c:when test="${gvo.group_id==param.group_id}">
        			<div>
        			<%-- <a data-role="button" href="showWriteBoard.nu?category=${param.group_type }&group_id=${param.group_id }&id=${sessionScope.login.id}">게시글 작성</a> --%>
        				<p><a href="showWriteBoard.nu?category=${param.group_type }&group_id=${param.group_id }&id=${sessionScope.login.id}">
   							<button><img src="./img/write_font.png" height="20"></button>
   						</a></p>
        			</div>
        		</c:when><c:otherwise></c:otherwise>
        	</c:choose>
        </c:forEach>
	</div>
	<%------------------------------------------- 페이징 -------------------------------------------%>
	<%-- 이전 페이지 그룹이 있을 경우  --%>
	<center>
	<c:if test="${requestScope.listvo.pagingBean.previousPageGroup}">
		<a href="showPageList.nu?group_type=${param.group_type }&group_id=${param.group_id }&pageNo=${requestScope.listvo.pagingBean.startPageOfPageGroup-1}">◀</a>
	</c:if>
	<%-- 페이징 부분 --%>
	<c:forEach var="i" begin="${requestScope.listvo.pagingBean.startPageOfPageGroup}"
		end="${requestScope.listvo.pagingBean.endPageOfPageGroup}">
		<c:choose>
			<c:when test="${requestScope.listvo.pagingBean.nowPage!=i}">
				<a href="showPageList.nu?group_type=${param.group_type }&group_id=${param.group_id }&pageNo=${i}"><font size="5">${i}</font></a>
			</c:when>
			<c:otherwise>
				<font size="6">${i}</font>
			</c:otherwise>
		</c:choose>
	</c:forEach>
	<%-- 다음 페이지 그룹이 있을 경우 --%>
	<c:if test="${requestScope.listvo.pagingBean.nextPageGroup}">
		<a href="showPageList.nu?group_type=${param.group_type }&group_id=${param.group_id }&pageNo=${requestScope.listvo.pagingBean.endPageOfPageGroup+1}">▶</a>
	</c:if>
	</center>
	<footer data-role="footer" data-position="fixed">
	 <div data-role="navbar">
      <ul>
      	<c:forEach items="${sessionScope.login.list }" var="gvo">
        	<c:choose>
        		<c:when test="${gvo.group_id==param.group_id}">
        			 <li><a data-icon="write"  href="showWriteBoard.nu?category=${param.group_type }&group_id=${param.group_id }&id=${sessionScope.login.id}">게시글 작성</a></li>
        		</c:when><c:otherwise></c:otherwise>
        	</c:choose>
        </c:forEach>
        <c:choose>
        <c:when test="${sessionScope.login.id!=param.masterid}"></c:when>
        <c:otherwise>
        <c:if test="${fn:length(requestScope.listvo.planVOlist)==0}">
        <li><a href="insertPlanPage.nu?group_type=${param.group_type}&group_id=${param.group_id }" data-icon="star">새 계획</a></li>
      	</c:if>
        </c:otherwise>
        </c:choose>
      </ul>
    </div>
	</footer> </section>
</body>
</html>